<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <!-- 引入样式 -->
    <link rel="stylesheet" href="../css/style.css">
    <link rel="stylesheet" href="../plugins/elementui/index.css">
    <script src="../plugins/echarts/echarts.js"></script>
    <!-- 引入组件库 -->
    <script type="text/javascript" src="../js/jquery.min.js"></script>
    <script src="../js/vue.js"></script>
    <script src="../plugins/elementui/index.js"></script>
    <script src="../js/axios-0.18.0.js"></script>
</head>
<body>
<!-- 日期控件 -->
<div class="block">
    <el-date-picker
            v-model="value4"
            type="datetimerange"
            :picker-options="pickerOptions2"
            range-separator="至"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
            align="right">
    </el-date-picker>
</div>

</body>

<script>
    new Vue({
        el: '#block',
        data: {

            // pickerOptions2: {
            //     shortcuts: [{
            //         text: '最近一周',
            //         onClick(picker) {
            //             const end = new Date();
            //             const start = new Date();
            //             start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
            //             picker.$emit('pick', [start, end]);
            //         }
            //     }, {
            //         text: '最近一个月',
            //         onClick(picker) {
            //             const end = new Date();
            //             const start = new Date();
            //             start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
            //             picker.$emit('pick', [start, end]);
            //         }
            //     }, {
            //         text: '最近三个月',
            //         onClick(picker) {
            //             const end = new Date();
            //             const start = new Date();
            //             start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
            //             picker.$emit('pick', [start, end]);
            //         }
            //     }]
            // },
            // value3: [new Date(2000, 10, 10, 10, 10), new Date(2000, 10, 11, 10, 10)],
            // value4: ''
        }
    })
</script>

</html>